<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>任务延迟申请记录管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/devmng/taskDelayApplyLog/">任务延迟申请记录列表</a></li>
		<%--<shiro:hasPermission name="devmng:taskDelayApplyLog:edit"><li><a href="${ctx}/devmng/taskDelayApplyLog/form">任务延迟申请记录添加</a></li></shiro:hasPermission>--%>
	</ul>
	<form:form id="searchForm" modelAttribute="taskDelayApplyLog" action="${ctx}/devmng/taskDelayApplyLog/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label style="width: 140px">创建人：</label>
				<sys:treeselect id="createBy" name="createBy.id" value="${taskDelayApplyLog.createBy.id}" labelName="" labelValue="${taskDelayApplyLog.createBy.name}"
					title="用户" url="/sys/office/treeData?type=3" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
			</li>
			<li><label style="width: 140px">原计划开始时间：</label>
				<input name="originalStart" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${taskDelayApplyLog.originalStart}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			</li>
			<li><label style="width: 140px">原计划完成时间：</label>
				<input name="originalEnd" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${taskDelayApplyLog.originalEnd}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			</li>
			<li><label style="width: 140px">申请任务开始时间：</label>
				<input name="applyStart" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${taskDelayApplyLog.applyStart}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			</li>
			<li><label style="width: 140px">申请任务完成时间：</label>
				<input name="applyStop" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${taskDelayApplyLog.applyStop}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			</li>
			<li><label style="width: 140px">任务状态：</label>
				<form:select path="status" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('TASK_DELAY_STATUS')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label style="width: 140px">申请理由：</label>
				<form:input path="applyContent" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li><label style="width: 140px">原任务名称：</label>
				<form:input path="originalTaskName" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>创建人</th>
				<th>原计划开始时间</th>
				<th>原计划完成时间</th>
				<th>申请任务开始时间</th>
				<th>申请任务完成时间</th>
				<th>状态</th>
				<th>申请理由</th>
				<th>原任务名称</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="taskDelayApplyLog">
			<tr>
				<td>
						${taskDelayApplyLog.createName.name}
				</td>
				<td>
					<fmt:formatDate value="${taskDelayApplyLog.originalStart}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>

				<td>
					<fmt:formatDate value="${taskDelayApplyLog.originalEnd}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>

				<td>
					<fmt:formatDate value="${taskDelayApplyLog.applyStart}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>

				<td>
					<fmt:formatDate value="${taskDelayApplyLog.applyStop}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>

				<td>
						${ fns:getDictLabel (taskDelayApplyLog.status, 'TASK_DELAY_STATUS', '')}
				</td>

				<td>
					${taskDelayApplyLog.applyContent}
				</td>

				<td>
					${taskDelayApplyLog.originalTaskName}
				</td>


				<td>
					<c:if test="${taskDelayApplyLog.status eq 'PENDING'}">
						<a href="${ctx}/devmng/taskDelayApplyLog/pass?id=${taskDelayApplyLog.id}">通过</a>
						<a href="${ctx}/devmng/taskDelayApplyLog/reject?id=${taskDelayApplyLog.id}">拒绝</a>
					</c:if>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>